package ch7;
//汽车检测站
public class DetectionCenter {
    private String name,address,telephone;

    public DetectionCenter(String name, String address, String telephone) {
        this.name = name;
        this.address = address;
        this.telephone = telephone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    @Override
    public String toString() {
        return "检测站信息：\n" +
                "名称：" + name +
                ", 地址：" + address  +
                ", 电话：" + telephone ;
    }

    public void detection(Car c){
        System.out.println("这台车的信息是：");
        c.show();
        System.out.println("检测以后发现，这台车可以");
        c.start();
        c.accelerate();
        c.brake();
    }
}
